#include <stdio.h>

//https://www.nowcoder.com/practice/fcf87540c4f347bcb4cf720b5b350c76?tpId=188&&tqId=38666&rp=1&ru=/activity/oj&qru=/ta/job-code-high-week/question-ranking

int findPeakElement(int *nums, int numsLen) {
    int left = 0;
    int right = numsLen - 1;
    //二分法
    while(left < right){
        int mid = (left + right) / 2;
        if(nums[mid] > nums[mid + 1]) {  //右边是往下，不一定有坡峰
            right = mid;
        } else {                         //右边是往上，一定能找到波峰
            left = mid + 1;
        }
    }
    //其中一个波峰
    return right;
}

int main() {

    return 0;
}